package com.ruoyi.carShop.controller;



import com.ruoyi.carShop.domain.VerificationDetails;
import com.ruoyi.carShop.service.VerificationDetailsService;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/shopVerificationDetails")
public class VerificationDetailsController {

    @Autowired
    private VerificationDetailsService verificationDetailsService;



    //根据核销码查询相应信息
    @RequestMapping("/getCode")
    public R<VerificationDetails> selectVerificationDetailsById(VerificationDetails verificationDetails) {
        System.out.println(verificationDetailsService.selectVerificationDetailsById(verificationDetails));
        return R.ok(verificationDetailsService.selectVerificationDetailsById(verificationDetails));
    }


//         //修改核销状态
//     public Integer updateVerificationStatus(Long id);
    @RequestMapping("/updateStatus")
    public R<Integer> updateVerificationStatus(Long id){
        return R.ok(verificationDetailsService.updateVerificationStatus(id));
    }

}
